package com.nvelickovic10.snake.beans.snake;

public enum Direction {
	UP, DOWN, LEFT, RIGHT;

	public static Direction getOppositeDirection(Direction direction) {
		switch (direction) {
		case LEFT:
			return Direction.RIGHT;
		case RIGHT:
			return Direction.LEFT;
		case UP:
			return Direction.DOWN;
		case DOWN:
			return Direction.UP;
		default:
			return null;
		}
	}
}
